﻿(function (doc, win) {
    var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function () {
            var clientWidth = docEl.clientWidth;
            if (!clientWidth) return;
            docEl.style.fontSize = 72 * (clientWidth / 1080) + 'px';
        };
    if (!doc.addEventListener) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);


function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}


// var baseUrl = 'http://10.10.0.146:10086/';
// 添加请求拦截器
axios.interceptors.request.use(function(config){
    var token = GetQueryString("token");
    if(token) {
        config.headers.common['X-Authentication'] = token;
    }else{
        Solution.isBuy = 2;
    }
return config;
},function(error){
    return Promise.reject(error);
});